package com.yiwu.common.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * @version 1.0
 * @description TODO
 * @date 2024/5/15 1:17
 */
@Getter
@Setter
public class BusinessException extends RuntimeException{
    private int code;
    private String message;

    public BusinessException(BaseExceptionInterface baseExceptionInterface){
        this.code = baseExceptionInterface.getCode();
        this.message = baseExceptionInterface.getMessage();
    }

    public BusinessException(String message){
        this.message = message;
    }
    public BusinessException(Integer code,String message){
        this.code = code;
        this.message = message;
    }
}